
package com.be.beadmin.material.service;

import com.be.beadmin.common.entity.PageEntity;
import com.be.beadmin.material.dto.input.PickingDetailsDto;
import com.be.beadmin.material.dto.input.PtCodeAndPage;
import com.be.beadmin.material.dto.output.PickingDetailsEx;
import com.be.beadmin.material.entity.PickingDetails;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.Query;

import java.text.ParseException;
import java.util.List;

/**
* @description 服务接口
* @author zmy
* @date 2023-05-14
**/
public interface PickingDetailsService {

    /**
    * 分页的查询接口
    * @param pageEntity
    * @return
    */
    Page<PickingDetails> getPickingDetailsByPage(PageEntity pageEntity);

    Page<PickingDetailsEx> getPickingDetailsByPageLike(PageEntity pageEntity,String like, String pickingTaskCode);

    Page<PickingDetailsEx> getPickingDetailsByPageLike2(PageEntity pageEntity,String like, String pickingTaskCode);

    /**
    * @param pickingDetailsDto
    */
    void addPickingDetails(PickingDetailsDto pickingDetailsDto);

    /**
    * @param pickingDetailsDto
    */
    void updatePickingDetails(PickingDetailsDto pickingDetailsDto);

    /**
    * @param id
    */
    void delPickingDetails(String id);

    /**
    * 删除多个角色
    * @param ids
    */
    void delPickingDetailss (List<String> ids);

    void addMaterialQtyByMaterialCodeAndPickingTaskCode(String mCode,String pCode);

    void allocation(String id,int num) throws ParseException;

    void allocation2(String pickingdetails_id,double notissueqty, double outboundQty) throws ParseException;

    void allocation3(String batchPlanId,double notissueqty, double outboundQty, String materialCode) throws ParseException;
    void scanSerNo(String id,String scanSerNo) ;

    /**
     * 分页获取分料细节信息
     * @param pageEntity
     * @return
     */
    Page<PickingDetailsEx> getPickingDetailsByPageAndPTcode(PtCodeAndPage pageEntity);

    List<String> getBarcodesByPickingTaskCode(String pickingTaskCode);

    List<PickingDetails> getPickingDetailsByBatchPlanId(String batchPlanId);
}